Apparatuses searching documents (e.g., dictionaries) containing plural items (fields) are known. To enhance the convenience for users, some search apparatuses not only determine whether a character string exists in documents to be searched, but also determine the order of the documents arranged in search results on the basis of, for example, the appearance frequencies of the character string (e.g., Unexamined Japanese Patent Application Kokai Publication No. H10-049549 (Patent Literature 1)). In the technique disclosed in Patent Literature 1, an index is used for searching.
Some electronic dictionaries have two search functions to enhance the convenience for users: an incremental search function to retrieve entry words every time one character of a search keyword is input and to display a list of retrieved entry words; and a full text search (main search) function to search the entire text after completion of input of a search keyword. Such electronic dictionaries generally execute the incremental search through forward matching search and execute the full text search through partial match search.
However, to allow a single apparatus to perform the function using forward matching search and the function using partial match search by applying the technique of Patent Literature 1, the apparatus is required to separately store different pieces of index information corresponding to the individual functions. This causes a problem of increase in necessary storage capacity.
The present invention has been achieved in view of such background. An object of the present invention is to provide a text search apparatus and a text search method that can achieve search functions with great convenience for users and that require only a small storage capacity.